unit U_OutputTextList;

interface

uses 
  Windows, Messages, SysUtils, Classes, Graphics, Forms, Dialogs, Controls, StdCtrls, 
  Buttons, Menus, ExtCtrls, siComp;

type
  TfmOutputTextList = class(TForm)
    M: TMemo;
    PM: TPopupMenu;
    SD: TSaveDialog;
    Kaydet1: TMenuItem;
    Panel1: TPanel;
    bIptal: TButton;
    bOnay: TButton;
    procedure Kaydet1Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure bOnayClick(Sender: TObject);
    procedure bIptalClick(Sender: TObject);
    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }


  end;

var
  fmOutputTextList: TfmOutputTextList;

implementation

uses ana1;

{$R *.dfm}
    var mt:integer;


procedure TfmOutputTextList.Kaydet1Click(Sender: TObject);
begin
 sd.Execute;
 if sd.FileName <> '' then
    M.Lines.SaveToFile(sd.FileName );

end;

procedure TfmOutputTextList.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  action:=CaFree;
  fmOutputTextList:=Nil;
end;

procedure TfmOutputTextList.bOnayClick(Sender: TObject);
begin
   Mt:=0;
   ModalResult:=mrok;
end;

procedure TfmOutputTextList.bIptalClick(Sender: TObject);
begin
   Mt:=0;
   ModalResult:=mrcancel;
end;

procedure TfmOutputTextList.FormCloseQuery(Sender: TObject;
  var CanClose: Boolean);
begin
   if bOnay.Visible =true then begin
      if Mt=0 then CanClose:=true else CanClose:=false;
   end;
end;

procedure TfmOutputTextList.FormCreate(Sender: TObject);
begin
  Mt:=1;
end;

end.